from Graph import Graph
import numpy as np
import sys


def kmeans(dist,n):
    center = 0
    msse = sys.maxsize 
    for i in range(n):
        sse = 0
        for v in range(n):
            if not v == i:
                sse = sse + dist[v,i]

        if sse < msse:
            msse = sse
            center = i
        print(i,sse)
    return center, msse


G = Graph()
dist = G.dist
n = G.n
print(kmeans(dist, n))




